package ${setFeginPackageName};

import com.allen.common.domain.BaseResult;
import com.allen.common.domain.PagingResultDto;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * Description:${tableAnnotation}Feign调用
 * @author ${author}
 * @date ${date}
 */
@FeignClient(value = "${FEIGN_CLIENT}")
@Component
public interface  ${SERVICEFEIGN_CLASSNAME} {
    <#--/*********************************** ${tableAnnotation} ${tableName}  *********************************************/-->

    @PostMapping("/manage/${tableRequestPath}/create")
    ResponseEntity<BaseResult<Integer>> create${tableName}(@RequestBody ${tableName} ${tableNameFirstLow});

    @PutMapping("/manage/${tableRequestPath}/update/{id}")
    ResponseEntity<BaseResult<Integer>> update${tableName}(@PathVariable("id") Long id, @RequestBody ${tableName} ${tableNameFirstLow});

    @DeleteMapping("/manage/${tableRequestPath}/{ids}")
    ResponseEntity<BaseResult<Integer>> delete${tableName}s(@PathVariable("ids") String ids);

    @GetMapping("/manage/${tableRequestPath}/{id}")
    ResponseEntity<BaseResult<${tableName}>> find${tableName}(@PathVariable("id") Long id);

    @PostMapping("/manage/${tableRequestPath}/pages")
    ResponseEntity<BaseResult<PagingResultDto<${tableName}>>> pageQuery${tableName}s(@RequestBody ${tableName} ${tableNameFirstLow});
}

